Skip to content

fix: prevent console window from appearing on Windows release builds#503

Merged
j4rviscmd merged 2 commits into
mainfrom
fix/no-console-window
May 10, 2026
Merged

fix: prevent console window from appearing on Windows release builds#503
j4rviscmd merged 2 commits into
mainfrom
fix/no-console-window

Conversation

@j4rviscmd
Copy link
Copy Markdown
Owner

Summary

On Windows release builds, launching VSCodeee caused a separate terminal/console window to appear with bun.exe running inside it (for vscode-neovim and other extensions). This did not happen on macOS.

The root cause was that bun.exe (a console-subsystem binary) was spawned without CREATE_NO_WINDOW (0x08000000) flag. When a GUI-subsystem parent process (Tauri app with windows_subsystem = "windows") spawns a console-subsystem child without this flag, Windows allocates a visible console window. Additionally, Stdio::inherit() on stdout contributed to the issue since the parent has no console in release builds.

Changes

  • Add CREATE_NO_WINDOW flag to all std::process::Command and tokio::process::Command invocations on Windows (6 locations across 4 files)
  • Change ExtHost sidecar stdout from Stdio::inherit() to Stdio::null() since the parent GUI process has no console in release builds
  • Move CommandExt imports to module level with #[cfg(windows)] for consistency
  • Add rustdoc comments to previously undocumented platform-specific helper functions

How to Test

  1. Build a Windows release binary (npm run tauri:devwin or release build)
  2. Launch the app
  3. Verify no separate console/terminal window appears alongside the main VSCodeee window
  4. Verify extensions load correctly (especially vscode-neovim)

🤖 Generated with Claude Code

j4rviscmd and others added 2 commits May 10, 2026 11:09
Add CREATE_NO_WINDOW (0x08000000) flag to all child process spawns
(bun.exe, taskkill, powershell, git, where) on Windows to prevent the
OS from allocating a visible console window. Also change ExtHost sidecar
stdout from Stdio::inherit() to Stdio::null() since the parent GUI
process has no console in release builds.

Co-Authored-By: Claude Opus 4.7 <[email protected]>
@j4rviscmd j4rviscmd added bug Something isn't working tauri Tauri 2.0 移行関連 windows labels May 10, 2026
@j4rviscmd j4rviscmd merged commit da6644c into main May 10, 2026
7 checks passed
@j4rviscmd j4rviscmd deleted the fix/no-console-window branch May 10, 2026 02:17
@j4rviscmd j4rviscmd mentioned this pull request May 10, 2026
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working tauri Tauri 2.0 移行関連 windows

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant